﻿<StackPanel x:Class="Guitar.CustomControls.PisteMenu"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" Orientation="Horizontal" HorizontalAlignment="Left"
            MouseEnter="Rectangle_MouseEnter" MouseLeave="Rectangle_MouseLeave" >
    <StackPanel.Resources>
        <ControlTemplate x:Key="toggleButtonTemplate" TargetType="ToggleButton">
            <Grid
                        Width="16"
                        Height="16"
                        Background="Transparent">
                <Image x:Name="ExpandImage"
                                  Source="/Guitar;component/CustomControls/img/unpined.png"
                                  HorizontalAlignment="Left" 
                                  VerticalAlignment="Center" 
                                  Margin="1,1,1,1" />
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsChecked"
                     Value="True">
                    <Setter Property="Source"
                              TargetName="ExpandImage"
                                  Value="/Guitar;component/CustomControls/img/pined.png"/>
                </Trigger>
                <Trigger Property="IsMouseOver"
                     Value="True">
                    <Setter Property="Source"
                              TargetName="ExpandImage"
                                  Value="/Guitar;component/CustomControls/img/pinedo.png"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style x:Key="toggleButtonStyle" TargetType="ToggleButton">
            <Setter Property="Template" Value="{StaticResource toggleButtonTemplate}" />
        </Style>

        <ControlTemplate x:Key="toggleButtonSonTemplate" TargetType="ToggleButton">
            <Grid
                        Width="23"
                        Height="23"
                        Background="Transparent">
                <Image x:Name="ExpandImage"
                                  Source="/Guitar;component/Images/ic/kmix-256.png"
                                  HorizontalAlignment="Left" 
                                  VerticalAlignment="Center" 
                                  Margin="1,1,1,1" />
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsChecked"
                     Value="True">
                    <Setter Property="Source"
                              TargetName="ExpandImage"
                                  Value="/Guitar;component/Images/ic/kmixdocked_mute-256.png"/>
                </Trigger>
                <Trigger Property="IsMouseOver"
                     Value="True">
                    <Setter Property="Source"
                              TargetName="ExpandImage"
                                  Value="/Guitar;component/Images/ic/kmixdocked_mute-256.png"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <Style x:Key="toggleButtonSonStyle" TargetType="ToggleButton">
            <Setter Property="Template" Value="{StaticResource toggleButtonSonTemplate}" />
        </Style>

        <LinearGradientBrush x:Key="normal" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="#FF696262" Offset="0" />
            <GradientStop Color="#FF9D9999" Offset="1" />
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="normal2" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="White" Offset="0" />
            <GradientStop Color="#FFDBD3D3" Offset="1" />
        </LinearGradientBrush>

    </StackPanel.Resources>
 
        
            <TextBox Width="92" Background="{StaticResource normal}" Height="28" VerticalContentAlignment="Center" Name="TextBox_Name"  VerticalAlignment="Center" Padding="2,0" Foreground="White"  BorderBrush="{x:Null}">Piste 1</TextBox>

        <StackPanel Orientation="Horizontal"  Name="InfosPiste"  Visibility="Collapsed" Height="28"   Background="#83000000">
            <ToggleButton ToolTip="Mode Muet" Height="23" Width="23" Name="ButtonMute"  Template="{StaticResource toggleButtonSonTemplate}"  Padding="5" Margin="5,0"></ToggleButton>
            <CheckBox ToolTip="Permet de jouer uniquement cette piste" VerticalContentAlignment="Center" VerticalAlignment="Center" Padding="4,0" Foreground="White">Solo</CheckBox>
            <Rectangle Height="21" Width="4"  RadiusX="3" RadiusY="3" Fill="{StaticResource normal2}" />
            <Label VerticalContentAlignment="Center" VerticalAlignment="Center" Padding="5,0" Foreground="White">Instrument</Label>
            <ComboBox Width="120" Text="Instruments"  VerticalContentAlignment="Center" VerticalAlignment="Center" ItemsSource="{Binding}">
                <ComboBoxItem IsSelected="True">Guitare Electrique</ComboBoxItem>
                <ComboBoxItem>Guitare Classique</ComboBoxItem>

            </ComboBox>
            <Rectangle Height="21" Width="4" RadiusX="3" RadiusY="3" Margin="5,0,0,0" Fill="{StaticResource normal2}"/>

            <Label VerticalContentAlignment="Center" VerticalAlignment="Center" Padding="5,0" Foreground="White">Volume :</Label>
            <Slider Orientation="Horizontal" Width="70" Template="{StaticResource HorizontalSlider}" VerticalAlignment="Center" Value="100" Maximum="100"></Slider>
            <Label VerticalContentAlignment="Center" VerticalAlignment="Center" Padding="5,0" Foreground="White">Pan :</Label>
            <Slider ToolTip="Gestion des cannaux gauche/droit" Orientation="Horizontal" Width="70" Template="{StaticResource HorizontalSlider}" VerticalAlignment="Center" Maximum="100" Value="50"></Slider>
            <Label Content="  " Foreground="White" Padding="2,0" VerticalContentAlignment="Center" />
            <ToggleButton ToolTip="Epingle la piste en cours pour qu'elle ne disparaisse pas à l'affichage" Margin="5" Height="16" Width="16" Name="pin"  Template="{StaticResource toggleButtonTemplate}" Click="pin_Click"></ToggleButton>
            
        </StackPanel>
    </StackPanel>


